   #include <stdio.h>

   int main() {
       int h, m, s, n;
       scanf("%d:%d:%d", &h, &m, &s);
       scanf("%d", &n);
       int start_seconds = h * 3600+m * 60 + s;
       int total_seconds = start_seconds + n;
       if (total_seconds >= 24 * 3600) {
           total_seconds = total_seconds % (24 * 3600);
       }
       int result_h = total_seconds / 3600;
       int result_m = (total_seconds % 3600)/60;
       int result_s = total_seconds % 60;
       printf("%02d:%02d:%02d\n", result_h, result_m, result_s);
       return 0;
   }
